<admintpl file="header" />
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href="{:U(CONTROLLER_NAME.'/'.ACTION_NAME)}">{:L('PORTAL_ADMINMANUATTR_INDEX')}</a></li>
        <li><a href="{:U(CONTROLLER_NAME.'/add')}">{:L('PORTAL_ADMINMANUATTR_ADD')}</a></li>
    </ul>

    <form class="js-ajax-form" method="post" action="{:U(CONTROLLER_NAME.'/listorders')}">
        <div class="table-actions">
            <!--<button type="submit" class="btn btn-primary btn-small js-ajax-submit">{:L('SORT')}</button>-->
        </div>

        <table class="table table-hover table-bordered table-list" id="menus-table">
            <thead>
            <tr>
                <th width="10">{:L('ID')}</th>

                <th width="80">{:L('TITLE')}</th>
                <!-- <th>点击量</th> -->

                <th width="120">{:L('ACTIONS')}</th>
            </tr>
            </thead>
            <foreach name="lists" item="vo" key="k">
                <tr id="node-{$vo.id}">
                    <td style="padding-left: 20px">{$k+1}</td>
                    <td><span>{$vo.name}</span></td>
                    <!--  <td>0</td> -->
                    <td>
                        <a href="{:U(CONTROLLER_NAME.'/edit',array('id'=>$vo['id'],'type'=>1))}">{:L('EDIT')}</a>|
                        <a href="{:U(CONTROLLER_NAME.'/delete',array('id'=>$vo['id'],'type'=>1))}" class="js-ajax-delete">{:L('DELETE')}</a>
                    </td>
                </tr>
                <volist name="vo[son]" id="vv" key="kk">
                    <tr id="node-{$vo.id}00000{$vv.id}" class="child-of-node-{$vo.id}" style="display: none">
                        <td >{$kk}</td>
                        <td><span>{$vv.name}</span></td>
                        <!--  <td>0</td> -->
                        <td>
                            <a href="{:U(CONTROLLER_NAME.'/edit',array('id'=>$vv['id'],'type'=>2))}">{:L('EDIT')}</a>|
                            <a href="{:U(CONTROLLER_NAME.'/delete',array('id'=>$vv['id'],'type'=>2))}" class="js-ajax-delete">{:L('DELETE')}</a>
                        </td>
                    </tr>
                </volist>
            </foreach>
            <tfoot>
            <tr>
                <th >{:L('ID')}</th>
                <th width="80">{:L('TITLE')}</th>
                <!-- <th>点击量</th> -->
                <th width="120">{:L('ACTIONS')}</th>
            </tr>
            </tfoot>
        </table>
        <div class="table-actions">
            <!--<button type="submit" class="btn btn-primary btn-small js-ajax-submit">{:L('SORT')}</button>-->
        </div>
        <div class="pagination">{$page}</div>
    </form>
</div>
<script src="__PUBLIC__/js/common.js"></script>
<script>
    setCookie('refersh_time', 0);
    function refersh_window() {
        var refersh_time = getCookie('refersh_time');
        if (refersh_time == 1) {
            window.location.reload();
        }
    }
    setInterval(function() {
        refersh_window()
    }, 2000);

</script>
<script>
    $(document).ready(function() {
        Wind.css('treeTable');
        Wind.use('treeTable', function() {
            $("#menus-table").treeTable({
                indent : 20
            });
        });
    });

    setInterval(function() {
        var refersh_time = getCookie('refersh_time_admin_menu_index');
        if (refersh_time == 1) {
            reloadPage(window);
        }
    }, 1000);
    setCookie('refersh_time_admin_menu_index', 0);
</script>
</body>
</html>